package com.sort;

import java.io.File;
import java.util.Comparator;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * *********************************************
 * @author Administrator
 * @FileName FileModifyTimeSort.java
 * @Description文件修改时间排序
 **********************************************
 */
public class FileModifyTimeSort implements Comparator<File>{
	public static final Logger LOG = LoggerFactory.getLogger(FileModifyTimeSort.class);

	@Override
	public int compare(File file1,File file2) {
		return (int)(file2.lastModified()-file1.lastModified());
	}

}
